/* 
 * File:   file_test.cpp
 * Author: starling13
 *
 * Created on 02.02.2015, 12:51:45
 */

#include <stdlib.h>
#include <iostream>

#include "posix_io_file.hpp"

/*
 * Simple C++ Test Suite
 */

void test1( )
{
    std::cout << "file_test test 1" << std::endl;
    
    posix::io::File file;
    file.setFileName( "/tmp/file.0" );
    posix::io::Mode mode;
    mode.setFlag( posix::io::Mode_t::RWXU );
    file.setMode( mode );
    file.create();
    file.close();
    
    posix::io::File file1;
    file1.create( "/tmp/file.1", posix::io::Mode_t::RWXU );
    file1.close();
}

void test2( )
{
    std::cout << "file_test test 2" << std::endl;
}

int main( int argc, char** argv )
{
    std::cout << "%SUITE_STARTING% file_test" << std::endl;
    std::cout << "%SUITE_STARTED%" << std::endl;

    std::cout << "%TEST_STARTED% test1 (file_test)" << std::endl;
    test1();
    std::cout << "%TEST_FINISHED% time=0 test1 (file_test)" << std::endl;

    std::cout << "%TEST_STARTED% test2 (file_test)\n" << std::endl;
    test2();
    std::cout << "%TEST_FINISHED% time=0 test2 (file_test)" << std::endl;

    std::cout << "%SUITE_FINISHED% time=0" << std::endl;

    return (EXIT_SUCCESS);
}

